<div ng-controller="AuthorizationCtrl" ng-init="applylistAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/authorization/applylist">{{'Apply Authorization'| translate}}</a></li>
        <li class="active">
            {{"List"|translate}}
            <a href="#/authorization/add" class="sui-btn btn-success">{{'add'|translate}}</a>
        </li>
        <span class="sui-form sui-form pull-right"> 
          <input type="text"  placeholder="{{'title commodity'|translate}}"  ng-model="title">
          <input type="text"  placeholder="{{'supply_name'|translate}}"  ng-model="supply_name">
          <button class="sui-btn btn-primary" type="submit" ng-click="getItemList()">{{'search'|translate}}</button>
        </span>
    </ul>
    <table class="sui-table table-bordered" ng-show="title">
        <thead>
            <tr>
                <th>{{'item_image'|translate}}</th>
                <th>{{'item_id'|translate}}</th>
                <th>{{'title'|translate}}</th>
                <th>{{'price'|translate}}</th>
                <th>{{'remark'|translate}}</th>
                <th>{{'operation'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in itemslist">
                <td><img ng-src="{{list.img}}" width="60" /></td>
                <td>{{list.outer_id}}
                    <br> {{list.created_at | ddtt}}</td>
                <td>{{list.title}}</td>
                <td>{{list.price}}</td>
                <td>{{list.note}}</td>
                <td>
                    <button ng-show="list.item_id && list.status_id!='2'" type="button" class="sui-btn btn-warning" ng-click="itemSkuStatusUpdate(list,2,1)">{{'cancel'|translate}}</button>
                    <button ng-show="list.item_id && list.status_id!='1'" type="button" class="sui-btn btn-danger" ng-click="itemSkuStatusUpdate(list,1,1)">{{'enable'|translate}}</button>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th>{{'Supplierid'|translate}}</th>
                <th>{{'supply_name'|translate}}</th>
                <th>{{'operation'|translate}}</th>
            </tr>
        </thead>
        
        <tbody>
            <tr ng-repeat="list in itemslist">
                <td>{{list.outer_id}}</td>
                <td>{{list.title}}</td>
                <td>
                    <a href="#/item/add?id={{list.item_id}}" class="sui-btn btn-success">{{'edit'|translate}}</a>
                </td>
            </tr>
        </tbody>
    </table>
    <!-- 分页start -->
    <pager page-no="1" page-size="pageSize" total="itemsTotal" get-data="getItemList(pageNo)"></pager>
    <!-- 分页end -->
</div>
